package com.bw.news.adapter;

import com.bw.mvvm.network.load.LoadImage;
import com.bw.news.R;
import com.bw.mvvm.entity.NewsEntity;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;

public class NewsValueAdapter extends BaseQuickAdapter<NewsEntity.DataBean, BaseViewHolder> {
    public NewsValueAdapter() {
        super(R.layout.item_news);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, NewsEntity.DataBean dataBean) {
        baseViewHolder.setText(R.id.item_shopping_state, dataBean.getMsg_title());
        baseViewHolder.setText(R.id.item_shopping_value, dataBean.getMsg_content());
        baseViewHolder.setText(R.id.item_shopping_time, dataBean.getMsg_time());
        LoadImage.loadMatchImg(dataBean.getMsg_icon(),baseViewHolder.getView(R.id.item_shopping_imag));
    }
}
